<?php
namespace Plugin\Attractions\Inspection\Schema\Inspection_device_types;

use Plugin\Attractions\Inspection\Model\Inspection_device_types\InspectionDeviceTypes;
use Hyperf\Swagger\Annotation\Property;
use Hyperf\Swagger\Annotation\Schema;

/**
 * 设备类型
 */
#[Schema(title: 'InspectionDeviceTypesSchema')]
class InspectionDeviceTypesSchema implements \JsonSerializable
{
    #[Property(property: 'id', title: 'ID', type: 'bigint')]
    public string $id;

    #[Property(property: 'name', title: '类型名称（游乐设备、广播设备、监控设备、其他设备）', type: 'varchar')]
    public string $name;




    public function __construct(InspectionDeviceTypes $model)
    {
       $this->id = $model->id;
       $this->name = $model->name;

    }

    public function jsonSerialize(): array
    {
        return ['id' => $this->id ,'name' => $this->name];
    }
}